-content_for :content do
	%h1
		Nuevo ticket

	- form_for :ticket, :url => tickets_path, :html => {:multipart => true } do |f|
		%p
			= label_tag 'Titulo: '
			%br/
			= f.text_field :title
		%p
			= label_tag 'Descripcion: '
			%br/
			= f.text_area :description, :rows => 7
			= f.hidden_field :user_id, options = {:value => current_user.id} 
			
		%table.record_options
			%thead
			%tbody
				%tr
					%th= label_tag 'Prioridad: '
					%td= select :ticket, :priority, @type_priorities
					%th= label_tag 'Archivo: '
					%td= file_field_tag :file

				%tr
					%th= label_tag 'Etiquetas: '
					%td#labels{:colspan => 3}
						%div=render :partial => 'label', :collection => @ticket.labels[0..2]
						%div=render :partial => 'label', :collection => @ticket.labels[3..5]
		%p
			=label_tag 'Proyecto: '
			-for project in @projects
				%br/
				=f.radio_button :project_id, project.id
				=project.name

		%p
			= submit_tag 'Crear', :class => "submit"
			= " | "
			= link_to "Atras", :back
